import Vue from 'vue';
import VueRouter from 'vue-router';
//首页
import Index from '@/components/Index.vue';
//分类
import Ctg from '@/components/Ctg.vue';
//购物车
import Spcart from '@/components/Spcart.vue';
//订单
import Order from '@/components/Order.vue';
//我的
import Mine from '@/components/Mine.vue';
//商店
import Shop from '@/components/Shop.vue';
//商品详情页
import Details from '@/components/merDetails.vue';
//登录
import Login from '@/components/Login.vue';
//注册1
import Regist1 from '@/components/Regist1.vue';
//状态管理
import Vuex from '@/components/Vuex.vue';
Vue.use(VueRouter);
export default new VueRouter({
    routes: [
        {
            path: '/shop/:shopid',
            name:'shop',
            props:true,
            component:Shop,
        },
        {
            path: '/vuex',
            component: Vuex,
        },
        {
            path: '/index',
            component: Index,
        },
        {
            path: '/ctg',
            component: Ctg,
        },
        {
            path: '/spcart',
            component: Spcart,
        },
        {
            path: '/order',
            component: Order,
        },
        {
            path: '/merdetails/:shopid',
            component: Details,
            name: 'merdetails',
            props: true,
        },
        {
            path: '/mine',
            name:'mine',
            props:true,
            component: Mine,
        },
        {
            path: '/login',
            component: Login,
        },
        {
            path: '/regist1',
            component: Regist1,
        },
    ]


})
